package com.hd.crdao.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 *
 *@author Programming
 *@date 2017/7/10 0010
 */
public class LoanCarTabAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> mFragments;
    private String[] titles = new String[]{"已贷款", "审核中", "已还款"};


    public LoanCarTabAdapter(FragmentManager fm, ArrayList<Fragment> fragments) {
        super(fm);
        this.mFragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }


}
